package com.dwxt.community.admin.controller;

import com.dwxt.common.base.BaseResult;
import com.dwxt.community.admin.service.IntegralServiceAdmin;
import com.dwxt.community.admin.service.UserServiceAdmin;
import com.dwxt.community.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/cms/user")
@RestController
public class VisbaleController {

    @Autowired
    private UserServiceAdmin userServiceAdmin;

    @Autowired
    private UserService userService;

    @Autowired
    private IntegralServiceAdmin integralServiceAdmin;

    //总用户数、知晓率、参与率、准确率
    @RequestMapping("/totalUsers")
    public BaseResult selectTotalUsers() {
        return userService.selectTotal();
    }


    @RequestMapping("/officerStatistics")
    public BaseResult officerStatistics() {
        return userServiceAdmin.officerStatistics();
    }


    /**
     * 行为积分 和 活动积分
     * @return
     */
    @RequestMapping("/integralStatistics")
    public BaseResult integralStatistics() {
        return integralServiceAdmin.integralStatistics();
    }

}

